package com.sojoys.artifact.manager;

import com.sojoys.artifact.factory.session.ISession;
import com.sojoys.artifact.factory.session.ISessionFactory;

/**
 * @author : DengYing
 * @CreateDate : 2017年10月18日 下午6:56:42
 * @Description ：Please describe this document
 */
public class SessionManager {
	private SessionManager() {
	}

	private static SessionManager ME = new SessionManager();

	public static SessionManager me() {
		return ME;
	}
	
	private ISessionFactory factory;

	public void setFactory(ISessionFactory factory) {
		this.factory = factory;
	}
	
	public ISession createSession(Object channel){
		return this.factory.createSession(channel);
	}
	
}
